package com.icloud.system.boot.controller.internal;

import com.icloud.common.core.api.CommonResult;
import com.icloud.system.api.dto.SaveAppOperationLogDto;
import com.icloud.system.api.feign.AppOperationLogFeignClient;
import com.icloud.system.boot.service.AppOperationLogService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@Api(tags = "内部App操作日志接口")
@RequestMapping("/internal/appOperationLog")
@RequiredArgsConstructor
public class InternalAppOperationLogController implements AppOperationLogFeignClient {
    private final AppOperationLogService appOperationLogService;
    /**
     * 保存操作日志
     * @param dto
     * @return
     */
    @Override
    public CommonResult<Void> saveAppOperationLog(SaveAppOperationLogDto dto) {
        appOperationLogService.addAppOperationLog(dto);
        return CommonResult.success();
    }
}
